using System;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

/// <summary>
/// Summary description for ManageEvent
/// </summary>
public class ManageEvent
{
    public int enterEvent(Event ev) 
    {
        DatabaseAccess da = new DatabaseAccess();
        return da.EnterEvent_LibrarianView(ev);
    }
    public void updateEvent(Event ev) { }
    public void deleteEvent(int EventID) { }

    //Jacquie
    public SqlDataAdapter searchEventLibrarianView(string s, int libraryId)
    {
        DatabaseAccess dbAccess = new DatabaseAccess();
        return dbAccess.GetEvents_LibrarianView(s, libraryId);
    }

    //Jacquie
    public int updateEventLibrarianView(int EventId, String Title, String Description, DateTime datetime, String Location)
    {
        DatabaseAccess dbAccess = new DatabaseAccess();
        return dbAccess.UpdateEvents_LibrarianView(EventId, Title, Description, datetime, Location);
    }

    public Event getEvent(int EventID)
    {
        DatabaseAccess accessor = new DatabaseAccess();

        return accessor.getEvent(EventID);
    }
    public DataSet getAllEvents(int LibraryID)
    {
        DatabaseAccess accessor = new DatabaseAccess();

        return accessor.getAllEvents(LibraryID);
    }
    public DataSet findEvents(int LibraryID, String Keyword)
    {
        DatabaseAccess accessor = new DatabaseAccess();

        return accessor.findEvents(LibraryID,Keyword);
    }
    public void CancelEvent(int EventID) { }
}
